#include "Prop.h"

// 展示武器参数信息
void Weapon::show()
{
    std::cout << "武器名🥊:|" << GetName()
              << "|     价格💰:|" << GetPrice()
              << "|     攻击力👊 +|" << GetAttack() << "|"
              << std::endl;
}

// 武器拷贝
PropPtr Weapon::clone()
{
    // 拷贝自己的一个全新对象
    return std::make_shared<Weapon>(this->GetName(),this->GetPrice(),this->GetAttack(),this->GetPropFlag());
}

std::vector<std::string> Weapon::GetPropInfo()
{
    std::vector<std::string> GetWeapon;
    std::string a = "Weapon";
    GetWeapon.push_back(a);
    GetWeapon.push_back(GetName());
    GetWeapon.push_back(std::to_string(GetPrice()));
    GetWeapon.push_back(std::to_string(GetAttack()));
    GetWeapon.push_back(std::to_string(GetPropFlag()));
    return GetWeapon;
}

// 展示防具参数信息
void Armor::show()
{
    std::cout << "防具名🎭:|" << GetName()
              << "|   价格💰:|" << GetPrice()
              << "|     防御力🪬  +|" << GetDefend() << "|"
              << std::endl;
}

// 防具拷贝
PropPtr Armor::clone()
{
    // 拷贝自己的一个全新对象
    return std::make_shared<Armor>(this->GetName(),this->GetPrice(),this->GetDefend(),this->GetPropFlag());
}

std::vector<std::string> Armor::GetPropInfo()
{
    std::vector<std::string> GetArmor;
    std::string a = "Armour";
    GetArmor.push_back(a);
    GetArmor.push_back(GetName());
    GetArmor.push_back(std::to_string(GetPrice()));
    GetArmor.push_back(std::to_string(GetDefend()));
    GetArmor.push_back(std::to_string(GetPropFlag()));
    return GetArmor;
}

// 展示药水参数信息
void Medicine::show()
{
    std::cout << "药水名💊:|" << GetName()
              << "|   价格💰:|" << GetPrice()
              << "|     血量🩸 +|" << GetHP() << "|"
              << std::endl;
}

// 药水拷贝
PropPtr Medicine::clone()
{
    // 拷贝自己的一个全新对象
    return std::make_shared<Medicine>(this->GetName(),this->GetPrice(),this->GetHP(),this->GetPropFlag());
}

std::vector<std::string> Medicine::GetPropInfo()
{
    std::vector<std::string> GetMedicine;
    std::string a = "Medicine";
    GetMedicine.push_back(a);
    GetMedicine.push_back(GetName());
    GetMedicine.push_back(std::to_string(GetPrice()));
    GetMedicine.push_back(std::to_string(GetHP()));
    GetMedicine.push_back(std::to_string(GetPropFlag()));
    return GetMedicine;
}
